<div id="titulo_azul">
	<span><?php __('Permisos de Accesos');?></span>
</div>
<div id="contenido_gral">

	<form action='/clients_accesos/' method='post'>
	<table style='width:680px;' cellspacing="0" id="tabla_gral">
		<tr>
			<th style='width:250px;font-weight: bold;'>&nbsp;<?php __('Módulo');?></th>
			<?php foreach ($Roles as $rol) { ?>
				<th style='width:50px;text-align:center;font-weight: bold;'><?php echo $rol['Rol']['name'];?></th>
			<?php }?>
		</tr>
		
		<?php foreach($TablaNombres as $clave =>$valor){?>
			<?php if(!isset($color) or $color=='#FFF' ) { $color='#EEEEFF'; } else {$color='#FFF';}?>
			<tr >
				<td><?php echo $valor;?></td>
				<?php foreach ($Roles as $rol) { ?>
					<td style='text-align:center;'>
						<?php if( $Tabla[$rol['Rol']['id']][$clave] ==1){$chk='checked'; } else { $chk='';} ;?>
						<input type='checkbox' name='data[<?php echo $rol['Rol']['id'];?>][<?php echo $clave;?>]' <?php echo $chk;?> >
						
					</td>
				<?php }?>
			</tr>
		<?php }	//end foreach $TablaNombre ?>
	</table>
	<input type='submit' value='<?php __('Guardar los Cambios');?>' class="btn btn-warning" style="width: 200px;">
	</form>
</div>